<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 特定的属性可以继承 */
        .box{
            color: red;
            text-align: center;
            font-size: 30px;

            /* 不能继承的 */
            width: 200px;
            height: 200px;
            border: 1px solid red;
        }
        .box1{
            /* 继承就近原则 */
            color: blue;
        }
    </style>
</head>
<body>
    <div class="box">
        

        <p>我是一段文字</p>

        <div class="box1">
            <p>我是css</p>
        </div>

    </div>
</body>
</html>